package cn.exrick.xboot.enterpriseUser.controller

import cn.exrick.xboot.base.dto.*
import cn.exrick.xboot.base.entity.*
import cn.exrick.xboot.base.login.LoginDto
import cn.exrick.xboot.base.vo.*
import cn.exrick.xboot.core.common.annotation.ParamValid
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import io.swagger.annotations.*
import lombok.extern.slf4j.Slf4j
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestMapping
import javax.validation.Valid


@Slf4j
interface IEnterpriseUserController {



    @Api(tags = ["政府部门用户管理"])
    @RequestMapping("/xboot/departmentUser")
    interface IDepartmentUser {


        @ApiOperation("添加政府部门用户")
        @PostMapping("/createDepartmentUser")
        fun createDepartmentUser(departmentUser: DepartmentUser): Result<Any?>?


        @ApiOperation("更新政府部门用户")
        @PostMapping("/updateDepartmentUser")
        fun updateDepartmentUser(departmentUser: DepartmentUser): Result<Any?>?


        @ApiOperation("移除政府部门用户")
        @PostMapping("/removeDepartmentUser")
        fun removeDepartmentUser(ids: Array<out String>): Result<Any?>?


        @ApiOperation("获取政府部门用户列表")
        @PostMapping("/getDepartmentUserList")
        fun getDepartmentUserList(pageVo: PageVo, departmentUser: DepartmentUser, levelType: Int): Result<MutableMap<String, Any?>>?
    }


    @Api(tags = ["企业用户管理接口"])
    @RequestMapping("/xboot/enterPriseUser")
    interface EnterPriseUser {


        @ApiOperation("获取统计的监管部门信息接受员")
        @PostMapping("/getSupervisionMessageByArea")
        fun getSupervisionMessageByArea(): Result<List<UserCommonVo>>?

        @ApiOperation("获取员工信息")
        @PostMapping("/getEmployeeInfo")
        fun getEmployeeInfo(employeeUserId: String?): Result<EmployeeInfoVo?>?

        @ApiOperation("企业申请")
        @PostMapping("/insertCompanyInfo")
        fun insertCompanyInfo(enterpriseUser: EnterpriseUser, code: String?, checkuserId: String): Result<Any?>?


        @ApiOperation("获取我提交的企业申请")
        @PostMapping("/getMyCompanyInfo")
        fun getMyCompanyInfo(): Result<MyCompanyInfoVo>?

        @ApiOperation("根据类型获取不同用户")
        @PostMapping("/getUserByType")
        fun getUserByType(type: Int) : Result<List<UserCommonVo>>?
    }

    @Api(tags = ["app用户登录管理接口"])
    @RequestMapping("/xboot/login")
    interface Login {

        @ApiOperation("app用户登录")
        @PostMapping("/appLogin")
        fun appLogin(loginDto: LoginDto): Result<Any?>?

        @ApiOperation("app注册")
        @PostMapping("/appRegister")
        @ParamValid
        fun appRegister(@Valid loginDto: LoginDto) : Result<Any?>?

        @ApiOperation("app忘记密码")
            @PostMapping("/appForgetPassword")
        @ParamValid
        fun appForgetPassword(loginDto: LoginDto) : Result<Any?>?
    }

    @Api(tags = ["企业员工管理接口"])
    @RequestMapping("/xboot/enterpriseEmployee")
    interface EnterpriseEmployee {


        @ApiOperation("获取企业员工列表")
        @PostMapping("/getBackEnterpriseEmployeeList")
        fun getEnterpriseEmployeeList(enterpriseId: String): Result<MutableList<UserCommonVo>>

        @ApiOperation("企业添加用户(管理系统)")
        @PostMapping("/createEnterpriseEmployee")
        fun createEnterpriseEmployee(enterpriseEmployeeDto: EnterpriseEmployeeDto?): Result<Any?>?


        @ApiOperation("更新员工信息(app)")
        @PostMapping("/updateEmployeeInfo")
        fun updateEmployeeInfo(employeeInfoDto: EmployeeInfoDto): Result<Any?>?

        @ApiOperation("企业编辑用户(管理系统)")
        @PostMapping("/updateEnterpriseEmployee")
        fun updateEnterpriseEmployee(enterpriseEmployeeDto: EnterpriseEmployeeDto?): Result<Any?>?

        @ApiOperation("移除企业用户")
        @PostMapping("/removeEnterpriseEmployee")
        fun removeEnterpriseEmployee(ids: Array<out String>?): Result<Any?>?

        @ApiOperation("禁用用户")
        @PostMapping("/forbiddenEnterpriseEmployee")
        fun forbiddenEnterpriseEmployee(ids: Array<out String>?): Result<Any?>?


        @ApiOperation("企业给员工设置安全影响人(管理系统)")
        @PostMapping("/settingAffectedPerson")
        fun settingAffectedPerson(enterpriseSafePersonDto: EnterpriseSafePersonDto?): Result<Any?>?

        @ApiOperation("获取我的安全影响人列表(管理系统)")
        @PostMapping("/getAffectedPersonList")
        fun getAffectedPersonList(id: String?): Result<MutableList<EnterpriseEmployeeVo>>?

        @ApiOperation("移除我的安全影响人列表(管理系统)")
        @PostMapping("/removeAffectedPersonList")
        fun removeAffectedPersonList(ids: Array<out String>, id: String?): Result<Any?>?

        @ApiOperation("企业给员工设置安全师傅(管理系统)")
        @PostMapping("/settingSafeMasterPerson")
        fun settingSafeMasterPerson(enterpriseSafePersonDto: EnterpriseSafePersonDto?): Result<Any?>?

        @ApiOperation("获取我的安全师傅列表(管理系统)")
        @PostMapping("/getSafeMasterPerson")
        fun getSafeMasterPerson(id: String?): Result<MutableList<EnterpriseEmployeeVo>>?

        @ApiOperation("移除安全师傅列表(管理系统)")
        @PostMapping("/removeSafeMasterPerson")
        fun removeSafeMasterPerson(ids: Array<out String>, id: String?): Result<Any?>?

        @ApiOperation("企业获取员工列表(管理系统)")
        @PostMapping("/getEnterpriseEmployeeList")
        fun getEnterpriseEmployeeList(enterpriseEmployeeSearchDto: EnterpriseEmployeeSearchDto?, pageVo: PageVo): Result<MutableMap<String, Any?>?>?

        @ApiOperation("设置员工是否可以离岗(管理系统)")
        @PostMapping("/settingEmployeeDimission")
        fun settingEmployeeDimission(ids: Array<out String>?): Result<Any?>?

        @ApiOperation("企业发布需求(管理系统)")
        @PostMapping("/publishOrUpdateEnterpriseTrainingNeed")
        fun publishOrUpdateEnterpriseTrainingNeed(enterpriseTrainingNeedDto: EnterpriseTrainingNeedDto): Result<Any?>?

        @ApiOperation("获取该企业发布的需求信息(管理系统)")
        @PostMapping("/getMyPublishEnterpriseTrainingNeedList")
        fun getMyPublishEnterpriseTrainingNeedList(pageVo: PageVo): Result<MutableMap<String, Any?>?>

        @ApiOperation("移除企业发布的需求信息(管理系统)")
        @PostMapping("/removePublishEnterpriseTrainingNeed")
        fun removePublishEnterpriseTrainingNeed(ids: Array<out String>): Result<Any?>?

        @ApiOperation("获取我影响其安全的人的列表")
        @PostMapping("/getMeAffectedPersonList")
        fun getMeAffectedPersonList(id: String?): Result<MutableList<EnterpriseEmployeeVo>>?

        /*------------------获取本企业的所有员工---------------------*/

        @ApiOperation("获取部门树")
        @PostMapping("/getDepartmentTree")
        fun getDepartmentTree(parentId: String?, enterpriseId: String): Result<MutableList<DepartmentVo>>?

        @ApiOperation("根据部门树获取员工列表")
        @PostMapping("/getEmployeeListByDepartment")
        fun getEmployeeListByDepartment(departmentId: String?): Result<MutableList<UserCommonVo>>?

        /*----------------------影响我安全的人------------------------*/

        @ApiOperation("影响我安全的人")
        @PostMapping("/getAffectedPersonVoList")
        fun getAffectedPersonVoList(): Result<MutableList<UserCommonVo>>
    }

    @Api(tags = ["岗位管理接口"])
    @RequestMapping("/xboot/job")
    interface Job {

        @ApiOperation("创建或者更新岗位")
        @PostMapping("/createOrUpdateJob")
        fun createOrUpdateJob(job: cn.exrick.xboot.base.entity.Job?): Result<Any?>?

        @ApiOperation("移除岗位")
        @PostMapping("/removeJob")
        fun removeJob(ids: Array<out String>): Result<Any?>?

        @ApiOperation("获取岗位列表")
        @PostMapping("/getJobList")
        fun getJobList(pageVo: PageVo): Result<MutableMap<String, Any?>>?

        @ApiOperation("获取岗位名称")
        @PostMapping("/getJobName")
        fun getJobName(id: String): String?

        @ApiOperation("根据条件获取岗位列表")
        @PostMapping("/jobVoList")
        fun jobVoList(): Result<MutableList<JobVo>?>?

        @ApiOperation("获取某个公司的岗位列表")
        @PostMapping("/getJobVoListByEnterpriseId")
        fun getJobVoListByEnterpriseId(enterpriseId: String): Result<MutableList<JobVo>>?
    }

    @Api(tags = ["行业接口管理"])
    @RequestMapping("/xboot/business")
    interface IBusiness {

        @ApiOperation("添加或者更新行业")
        @RequestMapping("/createOrUpdateBusiness")
        fun createOrUpdateBusiness(business: Business): Result<Any?>?

        @ApiOperation("移除行业")
        @RequestMapping("/removeBusiness")
        fun removeBusiness(ids: Array<out String>): Result<Any?>?

        @ApiOperation("获取行业列表")
        @RequestMapping("/getBusinessList")
        fun getBusinessList(pageVo: PageVo): Result<MutableMap<String, Any?>>?
    }

    @Api(tags = ["企业审核接口"])
    @RequestMapping("/xboot/enterpriseUserCheck")
    interface IEnterpriseUserCheck {

        @ApiOperation("获取待审核和已审核的企业列表")
        @PostMapping("/getCheckEnterpriseList")
        fun getCheckEnterpriseList(pageVo: PageVo, @ApiParam(name = "status", value = "传 1 代处理 传 2 已经处理") status: Int): Result<MutableMap<String, Any?>>?

        @ApiOperation("获取审核公司详情信息")
        @PostMapping("/getCheckEnterpriseDetail")
        fun getCheckEnterpriseDetail(id: String): Result<EnterpriseUserCheckDetailVo>?

        @ApiOperation("审核企业用户")
        @PostMapping("/checkEnterpriseUser")
        fun checkEnterpriseUser(enterpriseUserCheckDto: EnterpriseUserCheckDto): Result<Any?>?
    }

    @Api(tags = ["企业状态接口"])
    @RequestMapping("/xboot/IEnterpriseUserStatus")
    interface IEnterpriseUserStatus {

        @ApiOperation("修改企业存续状态")
        @PostMapping("/updateEnterpriseUserStatus")
        fun updateEnterpriseUserStatus(enterpriseUserStatus: EnterpriseUserStatus): Result<Any?>?
    }

    @Api(tags = ["企业通用参数接口"])
    @RequestMapping("/xboot/enterpriseCommonParam")
    interface IEnterpriseCommonParam {

        @ApiOperation("创建或者编辑企业通用参数")
        @PostMapping("/createOrUpdateEnterpriseCommonParam")
        fun createOrUpdateEnterpriseCommonParam(enterpriseCommonParam: EnterpriseCommonParam): Result<Any?>?

        @ApiOperation("移除企业通用参数")
        @PostMapping("/removeEnterpriseCommonParam")
        fun removeEnterpriseCommonParam(ids: Array<out String>): Result<Any?>?

        @ApiOperation("获取企业通用参数列表")
        @PostMapping("/getEnterpriseCommonParamList")
        fun getEnterpriseCommonParamList(pageVo: PageVo): Result<MutableMap<String, Any?>>?
    }


    @Api(tags = ["企业培训需求接口"])
    @RequestMapping("/xboot/enterpriseTrainingNeeds")
    interface IEnterpriseTrainingNeeds {


        @ApiOperation("发布需求")
        @PostMapping("/publishOrUpdateEnterpriseTrainingNeed")
        fun publishOrUpdateEnterpriseTrainingNeed(enterpriseTrainingNeedDto: EnterpriseTrainingNeedDto?): Result<Any?>?

        @ApiOperation("获取该企业发布的需求信息")
        @PostMapping("/getMyPublishEnterpriseTrainingNeedList")
        fun getMyPublishEnterpriseTrainingNeedList(pageVo: PageVo): Result<MutableMap<String, Any?>?>

        @ApiOperation("获取同地区企业发布的需求列表(app)")
        @PostMapping("/getEnterpriseTrainingNeedListByAreaId")
        fun getEnterpriseTrainingNeedListByAreaId(pageVo: PageVo): Result<MutableMap<String, Any?>>?

        @ApiOperation("移除企业发布的需求信息")
        @PostMapping("/removePublishEnterpriseTrainingNeed")
        fun removePublishEnterpriseTrainingNeed(ids: Array<out String>): Result<Any?>?
    }

    @Api(tags = ["就职企业接口"])
    @RequestMapping("/xboot/jobEnterprise")
    interface JobEnterprise {

        @ApiOperation("创建或者更新就职企业")
        @PostMapping("/createOrUpdateJobEnterprise")
        fun createOrUpdateJobEnterprise(jobEnterprise: cn.exrick.xboot.base.entity.JobEnterprise): Result<Any?>?

        @ApiOperation("移除就职企业")
        @PostMapping("/removeJobEnterprise")
        fun removeJobEnterprise(ids: Array<out String>): Result<Any?>?

        @ApiOperation("获取就职企业")
        @PostMapping("/getJobEnterpriseList")
        fun getJobEnterpriseList(pageVo: PageVo): Result<MutableMap<String, Any?>>?

        @ApiOperation("获取详情")
        @PostMapping("/getDetailById")
        fun getDetailById(id: String?): Result<cn.exrick.xboot.base.entity.JobEnterprise>?
    }

    @Api(tags = ["安全得分记录接口"])
    @RequestMapping("/xboot/safeScoreRecord")
    interface ISafeScoreRecord {

        @ApiOperation("创建或者更新安全得分")
        @PostMapping("/createOrUpdateScoreRecord")
        fun createOrUpdateScoreRecord(safeScoreRecord: SafeScoreRecord): Result<Any?>?

        @ApiOperation("移除安全得分")
        @PostMapping("/removeScoreRecord")
        fun removeScoreRecord(ids: Array<out String>): Result<Any?>?


        @ApiOperation("获取详情")
        @PostMapping("/getDetailById")
        fun getDetailById(id: String?): Result<SafeScoreRecord?>?

        @ApiOperation("获取安全得分")
        @PostMapping("/getJScoreRecordList")
        fun getJScoreRecordList(pageVo: PageVo): Result<MutableMap<String, Any?>>?
    }

    @Api(tags = ["员工当前考试状态管理接口"])
    @RequestMapping("/xboot/employeeExamStatus")
    interface IEmployeeExamStatus {

        @ApiOperation("员工点击去学习的时候记录考试状态表")
        @PostMapping("/createEmployeeExamStatus")
        fun createEmployeeExamStatus(trainId: String): Result<Any?>?

        @ApiOperation("获取岗位培训列表")
        @PostMapping("/getEmployeeTrainingList")
        fun getEmployeeTrainingList(pageVo: PageVo, jobType: Int): Result<MutableMap<String, Any?>>?

        @ApiOperation("获取我的培训列表")
        @PostMapping("/getMyEmployeeTrainingList")
        fun getMyEmployeeTrainingList(pageVo: PageVo, jobType: Int): Result<MutableMap<String, Any?>>?


        @ApiOperation("人员学习时间列表")
        @PostMapping("/getEmployeeStudyTime")
        fun getEmployeeStudyTime(pageVo: PageVo, enterpriseId: String?): Result<MutableMap<String, Any?>>?

        @ApiOperation("获取企业人员培训公示")
        @PostMapping("/getEmployeeTrainShow")
        fun getEmployeeTrainShow(employeeUserId: String): Result<MutableMap<String, Any?>>?

    }

    @Api(tags = ["员工正式考试信息记录表管理接口"])
    @RequestMapping("/xboot/employeeOfficialExamRecord")
    interface IEmployeeOfficialExamRecord {

        @ApiOperation("获取考试记录信息")
        @PostMapping("/getEmployeeOfficialExamVo")
        fun getEmployeeOfficialExamVo(id: String): EmployeeOfficialExamVo?

        @ApiOperation("获取我的考试信息记录最新的一条记录")
        @PostMapping("/getMyEmployeeOfficialExamLast")
        fun getMyEmployeeOfficialExamLast(): EmployeeOfficialExamRecord?
    }

    @Api(tags = ["考试监督员考试确认审核管理接口"])
    @RequestMapping("/xboot/examConfirmCheck")
    interface IExamConfirmCheck {

        @ApiOperation("添加监督员考试审核记录")
        @PostMapping("/createExamConfirmCheck")
        fun createExamConfirmCheck(examConfirmDto: ExamConfirmDto): Result<Any?>?


        @ApiOperation("/getExamConfirmBySupervisionId")
        @PostMapping("/getExamConfirmBySupervisionId")
        fun getExamConfirmBySupervisionId(pageVo: PageVo, confirmMessage: Boolean?): Result<MutableMap<String, Any?>>?


        @ApiOperation("获取考试审核详情")
        @PostMapping("/getExamConfirmDetail")
        fun getExamConfirmDetail(id: String): Result<EmployeeOfficialExamVo?>?

        @ApiOperation("审核考试")
        @PostMapping("/checkExam")
        fun checkExam(id: String?): Result<Any?>?

    }

    @Api(tags = ["考试监督员考试结果确认审核管理接口"])
    @RequestMapping("/xboot/examResultConfirmCheck")
    interface IExamResultConfirmCheck {

        @ApiOperation("添加考试结果确认审核")
        @PostMapping("/createExamResultConfirmCheck")
        fun createExamResultConfirmCheck(examSelPic: String?): Result<Any?>?

        @ApiOperation("获取审核列表")
        @PostMapping("/getMyExamResultConfirmCheckList")
        fun getMyExamResultConfirmCheckList(pageVo: PageVo, checkStatus: Int?): Result<MutableMap<String, Any?>?>?


        @ApiOperation("审核考试结果")
        @PostMapping("/checkExamResultConfirm")
        fun checkExamResultConfirm(examResultConfirmCheck: ExamResultConfirmCheck): Result<Any?>?

    }

    @Api(tags = ["消息管理接口"])
    @RequestMapping("/xboot/inform")
    interface IInform {

        @ApiOperation("获取我的消息通知")
        @PostMapping("/getMyInfo")
        fun getMyInfo(pageVo: PageVo): Result<MutableMap<String, Any?>>?


        @ApiOperation("发送消息")
        @PostMapping("/sendMessage")
        fun sendMessage(message: Message): Result<Any?>?

        @ApiOperation("获取详情")
        @PostMapping("/getMyInfoDetail")
        fun getMyInfoDetail(id: String?) : Result<Inform>?


        @ApiOperation("获取数量")
        @PostMapping("/getMyInfoCount")
        fun getMyInfoCount() : Result<Int>

    }

    @Api(tags = ["考试通过人员接口"])
    @RequestMapping("/xboot/IExamPassEmployee")
    interface IExamPassEmployee {


        @ApiOperation("获取考试通过人员名单")
        @PostMapping("/getExamPassEmployeeList")
        fun getExamPassEmployeeList(pageVo: PageVo): Result<MutableMap<String, Any?>?>?
    }


    @Api(tags = ["企业员工考试记录接口"])
    @RequestMapping("/enterpriseEmployeeRecord")
    interface IEnterpriseEmployeeRecord {

        @ApiOperation("添加或者创建员工考试记录(模拟考试结束提交)")
        @PostMapping("/createOrUpdateEnterpriseEmployeeRecord")
        fun createOrUpdateEnterpriseEmployeeRecord(enterpriseEmployeeRecord: EnterpriseEmployeeRecord): Result<Any?>?


        @ApiOperation("判断员工答案是否正确")
        @PostMapping("/judgeAnswerRightOrFalse")
        fun judgeAnswerRightOrFalse(enterpriseEmployeeRecordJudgeAnswerDto: EnterpriseEmployeeRecordJudgeAnswerDto): Result<Boolean>?


        @ApiOperation("获取考试记录")
        @PostMapping("/getEmployeeExamRecord")
        fun getEmployeeExamRecord(pageVo: PageVo, jobTrainPartId: String?): Result<MutableMap<String, Any?>>?

    }

}
